1 <?php include ( "inc/connect.inc.php" ); ?>
2 <?php
3
4 ob_start();
5 session_start();

6 if
(!isset($_SESSION['user_login'])) {
7     header(
"location: login.php");
8 }

9 else
{
10     $user = $_SESSION[
'user_login'];
11     $result = mysql_query(
"SELECT * FROM user WHERE id='$user'");
12         $get_user_email = mysql_fetch_assoc($result);
13             $uname_db = $get_user_email[
'firstName'];
14             $uemail_db = $get_user_email[
'email'];
15
16             $umob_db = $get_user_email[
'mobile'];
17             $uadd_db = $get_user_email[
'address'];
18 }

19
20 if
(isset($_REQUEST['uid'])) {
21     
22     $user2 = mysql_real_escape_string($_REQUEST[
'uid']);
23     
if($user != $user2){
24         header(
'location: index.php');
25     }
26 }
else {
27     header(
'location: index.php');
28 }
29
30 $search_value =
"";
31 ?>
32
33 <!DOCTYPE html>
34 <html>
35 <head>
36     <title>SAREE</title>
37     <link rel=
"stylesheet" type="text/css" href="css/style.css">
38     <meta name=
"viewport" content="width=device-width, initial-scale=1">
39 </head>
40 <body style=
"background-image: url(image/homebackgrndimg1.png);">
41     <div
class="homepageheader">
42             <div
class="signinButton loginButton">
43                 <div
class="uiloginbutton signinButton loginButton" style="margin-right: 40px;">
44                     <?php
45                         
if ($user!="") {
46                             echo
'<a style="text-decoration: none; color: #fff;" href="logout.php">LOG OUT</a>';
47                         }
48                         
else {
49                             echo
'<a style="text-decoration: none; color: #fff;" href="signin.php">SIGN IN</a>';
50                         }
51                      ?>
52                     
53                 </div>
54                 <div
class="uiloginbutton signinButton loginButton" style="">
55                     <?php
56                         
if ($user!="") {
57                             echo
'<a style="text-decoration: none; color: #fff;" href="profile.php?uid='.$user.'">Hi '.$uname_db.'</a>';
58                         }
59                         
else {
60                             echo
'<a style="text-decoration: none; color: #fff;" href="login.php">LOG IN</a>';
61                         }
62                      ?>
63                 </div>
64             </div>
65             <div style=
"float: left; margin: 5px 0px 0px 23px;">
66                 <a href=
"index.php">
67                     <img style=
" height: 75px; width: 130px;" src="image/ebuybdlogo.png">
68                 </a>
69             </div>
70             <div id=
"srcheader">
71                 <form id=
"newsearch" method="get" action="search.php">
72                         <?php
73                             echo
'<input type="text" class="srctextinput" name="keywords" size="21" maxlength="120" placeholder="Search Here..." value="'.$search_value.'"><input type="submit" value="search" class="srcbutton" >';
74                          ?>
75                 </form>
76             <div
class="srcclear"></div>
77             </div>
78         </div>
79     <div
class="categolis">
80         <table>
81             <tr>
82                 <th>
83                     <a href=
"women/saree.php" style="text-decoration: none;color: #ddd;padding: 4px 12px;background-color: #c7587e;border-radius: 12px;">Saree</a>
84                 </th>
85                 <th><a href=
"women/ornament.php" style="text-decoration: none;color: #ddd;padding: 4px 12px;background-color: #c7587e;border-radius: 12px;">Ornament</a></th>
86                 <th><a href=
"women/watch.php" style="text-decoration: none;color: #ddd;padding: 4px 12px;background-color: #c7587e;border-radius: 12px;">Watch</a></th>
87                 <th><a href=
"women/perfume.php" style="text-decoration: none;color: #ddd;padding: 4px 12px;background-color: #c7587e;border-radius: 12px;">Perfume</a></th>
88                 <th><a href=
"women/hijab.php" style="text-decoration: none;color: #ddd;padding: 4px 12px;background-color: #c7587e;border-radius: 12px;">Hijab</a></th>
89                 <th><a href=
"women/tshirt.php" style="text-decoration: none;color: #ddd;padding: 4px 12px;background-color: #c7587e;border-radius: 12px;">T-Shirt</a></th>
90                 <th><a href=
"women/footwear.php" style="text-decoration: none;color: #ddd;padding: 4px 12px;background-color: #c7587e;border-radius: 12px;">FootWear</a></th>
91                 <th><a href=
"women/toilatry.php" style="text-decoration: none;color: #ddd;padding: 4px 12px;background-color: #c7587e;border-radius: 12px;">Toilatry</a></th>
92             </tr>
93         </table>
94     </div>
95     <div style=
"margin-top: 20px;">
96         <div style=
"width: 900px; margin: 0 auto;">
97         
98             <ul>
99                 <li style=
"float: left;">
100                     <div
class="settingsleftcontent">
101                         <ul>
102                             <ul>
103                             <li><?php echo
'<a href="profile.php?uid='.$user.'" style=" background-color: #169e8f; border-radius: 4px; color: #fff;" >My Orders</a>'; ?></li>
104                             <li><?php echo
'<a href="settings.php?uid='.$user.'" >Settings</a>'; ?></li>
105                         </ul>
106                         </ul>
107                     </div>
108                 </li>
109                 <li style=
"float: right; background-color: #fff;">
110                     <div>
111                         <div>
112                             <table
class="rightsidemenu">
113                                 <tr style=
"font-weight: bold;" colspan="10" bgcolor="#3A5487">
114                                     <th>Product Name</th>
115                                     <th>Price</th>
116                                     <th>Total Product</th>
117                                     <th>Order Date</th>
118                                     <th>Delevery Date</th>
119                                     <th>Delevery Place</th>
120                                     <th>Delevery Status</th>
121                                     <th>View</th>
122                                 </tr>
123                                 <tr>
124                                     <?php include (
"inc/connect.inc.php");
125                                     $query =
"SELECT * FROM orders WHERE uid='$user' ORDER BY id DESC";
126                                     $run = mysql_query($query);
127                                     
while ($row=mysql_fetch_assoc($run)) {
128                                         $pid = $row[
'pid'];
129                                         $quantity = $row[
'quantity'];
130                                         $oplace = $row[
'oplace'];
131                                         $mobile = $row[
'mobile'];
132                                         $odate = $row[
'odate'];
133                                         $ddate = $row[
'ddate'];
134                                         $dstatus = $row[
'dstatus'];
135                                         
136                                         
//get product info
137                                         $query1 =
"SELECT * FROM products WHERE id='$pid'";
138                                         $run1 = mysql_query($query1);
139                                         $row1=mysql_fetch_assoc($run1);
140                                         $pId = $row1[
'id'];
141                                         $pName = substr($row1[
'pName'], 0,50);
142                                         $price = $row1[
'price'];
143                                         $picture = $row1[
'picture'];
144                                         $item = $row1[
'item'];
145                                         $category = $row1[
'category'];
146                                      ?>
147                                     <th><?php echo $pName; ?></th>
148                                     <th><?php echo $price; ?></th>
149                                     <th><?php echo $quantity; ?></th>
150                                     <th><?php echo $odate; ?></th>
151                                     <th><?php echo $ddate; ?></th>
152                                     <th><?php echo $oplace; ?></th>
153                                     <th><?php echo $dstatus; ?></th>
154                                     <th><?php echo
'<div class="home-prodlist-img"><a href="'.$category.'/view_product.php?pid='.$pId.'">
155                                                     <img src=
"image/product/'.$item.'/'.$picture.'" class="home-prodlist-imgi" style="height: 75px; width: 75px;">
156                                                     </a>
157                                                 </div>
' ?></th>
158                                 </tr>
159                                 <?php } ?>
160                             </table>
161                         </div>
162                     </div>
163                 </li>
164             </ul>
165         </div>
166     </div>
167
168     
169 </body>
170 </html>


Gõ tìm kiếm nhanh...